package com.hushan.elevator.service;

import com.hushan.elevator.dto.RiskRecordDto;
import com.hushan.elevator.model.DeviceInfo;
import com.hushan.elevator.model.RiskRecord;
import com.hushan.elevator.model.RiskRecordElevStatus;
import com.hushan.elevator.vo.RiskSearchVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface RiskRecordService {
    RiskRecord findRiskRecordById(Integer id);

    void updateRiskRecord(RiskRecord riskRecord);

    void deleteRiskRecord(Integer id);

    void addRiskRecord(RiskRecord risk);

    RiskRecordDto findRiskRecordDetail(Integer recordId);

    void addRiskRecordElevStatus(RiskRecordElevStatus elevStatus);

    RiskRecordElevStatus findElevStatus(int id);

    DeviceInfo findDeviceByRisk(int riskId);

    DeviceInfo findDeviceByRisk(RiskRecord riskRecord);

    void addHandleInfo(int riskId, int userId,int type, String msg) ;

    int countByDept(int deptId);

    RiskRecord findLatestRecordByDevice(int id);

    RiskRecord findByEventId(String name);

    List<RiskRecordDto> convertRiskRecordDto(List<Object[]> raws);

    Page<Object[]> findRisk(RiskSearchVo searchVo, Pageable pageable);
}
